package com.example.base_model.api

import com.example.base_model.bean.BaseHttpBean
import com.example.base_model.bean.BaseHttpPageBean
import com.example.base_model.bean.BaseHttpPageOtherBean
import com.example.base_model.bean.SearchBean
import com.example.base_model.bean.general.TestRequest
import okhttp3.RequestBody
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

/**
 * @Author: jiangKunKun
 * @CreateDate: 2025/7/14
 * @Description: 整个项目的通用接口
 * @SpittingGrooves
 */
interface ApiService {
    companion object {
//        const val SERVER_URL = "https://test-api.tianjinchuxing.com/"
        const val SERVER_URL = "https://pat-api.tianjinchuxing.com/"
    }
    @POST("core/api/v1/home/search")
    suspend fun searchList(@Body request: MutableMap<String, Any>): BaseHttpBean<BaseHttpPageBean<SearchBean>>

//    @POST("passenger/account/smsLogin")
//    suspend fun loginByCode(@Body request: LoginRequest): BaseHttpBean<LoginResponse>
//
//    @POST("passenger/account/login")
//    suspend fun loginByPassword(@Body request: LoginRequest): BaseHttpBean<LoginResponse>
//
//    @POST("message/sms/sendCodeSms")
//    suspend fun sendVerificationCode(@Body request: LoginRequest): BaseHttpBean<Unit>
//
//    @POST("passenger/account/logout")
//    suspend fun loginOut(@Body request: LoginRequest): BaseHttpBean<Unit>
//
//    @POST("passenger/account/forgetPwd")
//    suspend fun forgetPwd(@Body body: RequestBody): BaseHttpBean<Any?>
//
//    @GET("passenger/account/info")
//    suspend fun loginMsg(@Header("token") token: String?): BaseHttpBean<MemberBean>
//
//    @GET("filesystem/sign/getSts")
//    suspend fun getOssUpLoadSign(@Query("uploadType") uploadType: String?): BaseHttpBean<OssUploadFileBean>
    @POST("passenger/passenger/avatar")
    suspend fun baseApiTest(@Body body: TestRequest?): BaseHttpBean<String>
    @POST("passenger/passenger/avatar")
    suspend fun uploadProfile(@Body body: RequestBody?): BaseHttpBean<Any>

    @POST("https://tmatch-api.sigoran.com/iot/collect/v3/heartbeat/collect")
    suspend fun heartbeat(): BaseHttpBean<Any>

    @GET("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun aisleCode(@Query("collectDeviceCode") collectDeviceCode: String): BaseHttpBean<String>
    @GET("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun aisleCodeList(@Query("collectDeviceCode") json: String): BaseHttpBean<String>

    @GET("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun page(): BaseHttpBean<BaseHttpPageBean<String>>

    @GET("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun pageOther(): BaseHttpBean<BaseHttpPageOtherBean<Int, String>>

    @POST("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun beanList2(@Body body: List<TestRequest>): BaseHttpBean<String>
    @POST("https://tmatch-api.sigoran.com/iot/collect/v3/auth/getAisleCode")
    suspend fun beanList(@Body body: List<TestRequest>): BaseHttpBean<List<TestRequest>>

}